﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using SMSPanasonic.Data;
using System.Data.SqlClient;
namespace SMSPanasonic.Business
{
    class SQLCommand
    {
        public SQLCommand()
        { }

        public static int ExecuteNonQuery(string sSQL)
        {
            return DBSQLCommand.ExecuteNonQuery(sSQL);
        }

        public static int ExecuteNonQuery(string sSQL, params SqlParameter[] param)
        {
            return DBSQLCommand.ExecuteNonQuery(sSQL, param);
        }
       
        public static IDataReader ExecuteReader(string sSQL)
        {
            return DBSQLCommand.ExecuteReader(sSQL);
        }

        public static int ExecuteProc(string procName, params SqlParameter[] param)
        {
            return DBSQLCommand.ExecuteProc(procName, param);
        }

        public static object ExecuteScalar(string query, CommandType type, params SqlParameter[] param)
        {
            return DBSQLCommand.ExecuteScalar(query, type, param);
        }

        public static void BulkCopy(string tableName, DataTable table)
        {
            DBSQLCommand.BulkCopy(tableName, table);
        }

        public static ConnectionState isDatabaseAlive()
        {
            return DBSQLCommand.isDatabaseAlive();
        }
    }
}
